﻿//-----------------------------------------------------------------------
// <copyright file="IGuildRepository.cs" company="FastNET Services">
//     Copyright (c) 2008-2009. All Rights Reserved.
// </copyright>
// <license>
//     GPLv2
// </license>
// <warranty>
//     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
//     BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
//     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
//     DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// </warranty>
//-----------------------------------------------------------------------
#region Usings

using System;
using GateShift.Common.Repository.Interfaces.DataInterfaces;
using GateShift.Common.Repository.Interfaces.Repositories.Base;

#endregion

namespace GateShift.Common.Repository.Interfaces.Repositories
{
    /// <summary>
    /// Repository interface for IGuildData based data
    /// </summary>
    public interface IGuildRepository : IIdentityRepository<IGuildData>
    {
        /// <summary>
        /// Retrieves a single IGuildData by looking at the GuildName
        /// </summary>
        /// <param name="GuildName">Guild name to search by</param>
        /// <returns>IGuildData found or null if no guild was found</returns>
        /// <exception cref="ArgumentNullException">Thrown if the search value is null or empty</exception>
        IGuildData RetrieveByGuildName(string GuildName);

        /// <summary>
        /// Checks to see if an IGuildData exists by the GuildName
        /// </summary>
        /// <param name="GuildName">Guild name to search by</param>
        /// <param name="IgnoreID">ID of an guild to ignore during check</param>
        /// <returns>Boolean whether or not an guild exists in the system</returns>
        /// <exception cref="ArgumentNullException">Thrown if GuildName is null or empty</exception>
        /// <exception cref="InvalidCastException">Thrown if IgnoreID is of the wrong type for this repository</exception>
        bool GuildNameExists(string GuildName, Identity? IgnoreID);
    }
}